package com.baselibrary.test.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.baselibrary.libs.View.bar.initAction_Bar;
import com.baselibrary.libs.View.loading.LoadingView;
import com.baselibrary.libs.base.baseActivity.BaseActivity;
import com.baselibrary.test.R;

public class Main11Activity extends BaseActivity implements View.OnClickListener, LoadingView.ViewCallBack {

    private LoadingView mLoad;
    private TextView start;
    private TextView end;
    private initAction_Bar action_bar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public int getlayouXML() {
        return R.layout.activity_main11;
    }

    @Override
    public void initP() {

    }

    @Override
    public void initView() {
        mLoad = (LoadingView) findViewById(R.id.load);
        start = (TextView) findViewById(R.id.start);
        start.setOnClickListener(this);
        end = (TextView) findViewById(R.id.end);
        end.setOnClickListener(this);
        action_bar = (initAction_Bar) findViewById(R.id.action_bar);
        action_bar.set_Title("loading");
        initListener();
    }

    @Override
    public void initData() {

    }

    @Override
    public void initListener() {
        mLoad.setViewCallBack(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.start:
                mLoad.setShowLoading(true);
            break;
            case R.id.end:
                mLoad.setShowLoading(false);
            break;
        }
    }

    @Override
    public void open() {

    }

    @Override
    public void closed() {

    }
}
